package com.xuebank.nfe.nfecar.utils.network.service



import com.xuebank.nfe.nfecar.createPartFromFile
import com.xuebank.nfe.nfecar.createPartFromString
import com.xuebank.nfe.nfecar.model.*
import com.xuebank.nfe.nfecar.model.base.BaseModel
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.*

import rx.Observable


/**
 * Created by Wind_Fantasy on 2017/2/24.
 */

interface CommonService {


    @Multipart
    @POST("ossUpload/uploadVideo")
    fun uploadVideo(@Part() file: MultipartBody.Part?, @Part("pathName") pathName: RequestBody = createPartFromString("pathName")): Observable<BaseModel<VideoModel>>

    @Multipart
    @POST("ossUpload/uploadOSS")
    fun uploadFile(@Part() file: MultipartBody.Part?, @Part("pathName") pathName: RequestBody = createPartFromString("pathName")): Observable<BaseModel<VideoModel>>

    @POST("shop/list")
    fun shopList(@Body shopListParameterModel: ShopListParameterModel): Observable<BaseModel<ShopList>>
//发布
    @POST("blog/publish")
    fun fabu(@Body uploadDataModel: UploadDataModel): Observable<BaseModel<String>>


//编辑车记
    @POST("blog/edit")
    fun bianjifabu(@Body uploadDataModel: UploadDataModels): Observable<BaseModel<String>>

//保存草稿
    @POST("blogDraft/save")
    fun caogao(@Body uploadDataModel: UploadDataModel): Observable<BaseModel<String>>//保存草稿

// 编辑车记草稿
    @POST("blogDraft/edit")
    fun bianjicaogao(@Body uploadDataModel: UploadDataModels): Observable<BaseModel<String>>


//从草稿发布车记
    @POST("blogDraft/publish")
    fun caogaoGocheji(@Body uploadDataModel: UploadDataModelss): Observable<BaseModel<String>>
//车记草稿详情
    @POST("blogDraft/detail")
    fun caogaoxiangqing(@Body id: noPublishModel): Observable<BaseModel<FrontBackDataCaoGao>>



    //查询车记详情
    @POST("blog/detail")
    fun isPublish(@Body id: isPublishModel): Observable<BaseModel<FrontBackData>>



//    @POST("crm/api/v2.0/app/sendCaptcha")
//    fun sendVerifyCode(@Body phone: SmsSend): Observable<BaseModel<SmsSend>>
//
//    @GET("crm/api/v2.0/message/getMessageByType")
//    fun newsMessage(@Query("type") type: String): Observable<BaseModel<ArrayList<NewsMessageModel>>>
//
//    @GET("crm/api/v2.0/message/updateMessageStatus")
//    fun updateMessageStatus(@Query("id") id: Int): Observable<BaseModel<UpdateMessageStatus>>
//
//    @POST("crm/api/v2.0/app/uploadProfileImage")
//    fun uploadAvatar(@Body base64Image: UploadAvata): Observable<BaseModel<UploadAvata>>
//
//    @GET("crm/api/v2.0/app/getHrSaleProfileImage")
//    fun smailCardImage(): Observable<BaseSmailCardModel>
//
//    /**
//     * 小红点未读
//     */
//    @GET("crm/api/v2.0/message/getUnreadMessageSum")
//    fun redspot(): Observable<BaseModel<RedSpotModel>>
//
//    /**
//     * 公告消息
//     */
//    @GET("crm/api/v2.0/message/getAnnouncementMessage")
//    fun bulletinmessage(): Observable<BaseModel<ArrayList<BulletinMessageModel>>>
//
//    /**
//     * 跟换设备验证码
//     */
//    @POST("crm/api/v2.0/app/sendUnbindVerificationCode")
//    fun updataDevice(@Body info: UpdataDeviceSmsSend): Observable<BaseModel<UpdataDeviceSmsSend>>
//
//    /**
//     * 设备号解绑提交申请
//     */
//    @POST("crm/api/v2.0/app/unbind")
//    fun submitApplication(@Body info: EquipmentBreakingUpSubmitApplication): Observable<BaseModel<EquipmentBreakingUpSubmitApplication>>
//
//    /**
//     * 推送上传信息
//     */
//    @POST("crm/api/v2.0/app/pushMessage/token")
//    fun pushUpData(@Body info: PushUpDataModel<ArrayList<PushProviderModel>>): Observable<BaseModel<PushUpDataModel<ArrayList<PushProviderModel>>>>
//
//
//    /**
//     * 高德地图接收历史借款人位置
//     */
//    @GET("/crm/api/v2.0/app/getNearbyApplies")
//    fun getHistoricalBorrower(@Query("latitude") latitude: Double, @Query("longitude") longitude: Double, @Query("distanceInMeter") distanceInMeter: Int): Observable<BaseModel<ArrayList<HistoricalBorrower>>>
//
//    @POST("/crm/api/v2.0/app/stepsToday")
//    fun stepNumber(@Body info: StepNumber): Observable<BaseModel<StepNumber>>
//
//    @GET("/crm/api/v2.0/app/steps")
//    fun stepsData(@Query("type") type: String):Observable<BaseModel<ArrayList<StepsData>>>
}
